/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.cloudfarming.client.sensor.cropcircle.view;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.ArrayList;
import nl.cloudfarming.client.logging.AppLogFactory;
import nl.cloudfarming.client.logging.AppLogger;
import nl.cloudfarming.client.sensor.cropcircle.CropcircleFileProcessor;
import nl.cloudfarming.client.sensor.cropcircle.CropcirclePreference;

final class CropcircleMetadataPanel extends javax.swing.JPanel implements KeyListener{

    private static final AppLogger LOG = AppLogFactory.getLogger(CropcircleFileProcessor.class);

    private final CropcircleMetadataOptionsPanelController controller;
    

    CropcircleMetadataPanel(CropcircleMetadataOptionsPanelController controller) {
        this.controller = controller;
        initComponents();
        initComponentListeners();
    }

    /** Init listeners 
     * removed from constructor because of possible initialisation problems     * 
     */
    private void initComponentListeners() {
        channelTextField1.addKeyListener(this);
        channelTextField2.addKeyListener(this);
        channelTextField3.addKeyListener(this);
        cropCircleSensorSpreadTextFieldL1.addKeyListener(this);
        cropCircleSensorSpreadTextFieldL2.addKeyListener(this);
        cropCircleSensorSpreadTextFieldL3.addKeyListener(this);
        cropCircleSensorSpreadTextFieldR1.addKeyListener(this);
        cropCircleSensorSpreadTextFieldR2.addKeyListener(this);
        cropCircleSensorSpreadTextFieldR3.addKeyListener(this);    
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        fileFormatLabel = new javax.swing.JLabel();
        cropcircleSensorHeightLabel = new javax.swing.JLabel();
        meterLabel = new javax.swing.JLabel();
        cropCircleSeparator = new javax.swing.JSeparator();
        cropcircleLabel = new javax.swing.JLabel();
        cropCircleSensorHeightSlider = new javax.swing.JSlider();
        cropCircleSensorHieghtDisplayLabel = new javax.swing.JLabel();
        numberOfSensorCombobox = new javax.swing.JComboBox();
        numberOfSensorLabel = new javax.swing.JLabel();
        dateFormatComboBox = new javax.swing.JComboBox();
        cropCircleSenosorSpreadCentimeterLabel = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        sensorTypeLabel = new javax.swing.JLabel();
        sensorTypeComboBox = new javax.swing.JComboBox();
        cropCircleSensorSpreadTextFieldL1 = new javax.swing.JTextField();
        cropCircleSensorSpreadTextFieldR1 = new javax.swing.JTextField();
        cropCircleSensorSpreadTextFieldL2 = new javax.swing.JTextField();
        cropCircleSensorSpreadTextFieldR2 = new javax.swing.JTextField();
        cropCircleSensorSpreadTextFieldR3 = new javax.swing.JTextField();
        cropCircleSensorSpreadTextFieldL3 = new javax.swing.JTextField();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelL1 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelL2 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelL3 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelR1 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelR2 = new javax.swing.JLabel();
        cropCircleSensorSpreadLabelR3 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel8 = new javax.swing.JLabel();
        channelLabel1 = new javax.swing.JLabel();
        channelLabel2 = new javax.swing.JLabel();
        channelLabel3 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        channelTextField1 = new javax.swing.JTextField();
        channelTextField2 = new javax.swing.JTextField();
        channelTextField3 = new javax.swing.JTextField();

        org.openide.awt.Mnemonics.setLocalizedText(fileFormatLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.fileFormatLabel.text")); // NOI18N
        fileFormatLabel.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.fileFormatLabel.toolTipText")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropcircleSensorHeightLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropcircleSensorHeightLabel.text")); // NOI18N
        cropcircleSensorHeightLabel.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropcircleSensorHeightLabel.toolTipText")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(meterLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.meterLabel.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropcircleLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropcircleLabel.text")); // NOI18N

        cropCircleSensorHeightSlider.setMaximum(500);
        cropCircleSensorHeightSlider.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorHeightSlider.toolTipText")); // NOI18N
        cropCircleSensorHeightSlider.setValue(0);
        cropCircleSensorHeightSlider.setMaximumSize(new java.awt.Dimension(32767, 14));
        cropCircleSensorHeightSlider.setMinimumSize(new java.awt.Dimension(36, 14));
        cropCircleSensorHeightSlider.setPreferredSize(new java.awt.Dimension(200, 14));
        cropCircleSensorHeightSlider.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                cropCircleSensorHeightSliderStateChanged(evt);
            }
        });
        cropCircleSensorHeightSlider.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                cropCircleSensorHeightSliderPropertyChange(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorHieghtDisplayLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorHieghtDisplayLabel.text")); // NOI18N
        cropCircleSensorHieghtDisplayLabel.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorHieghtDisplayLabel.toolTipText")); // NOI18N

        numberOfSensorCombobox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "4", "6" }));
        numberOfSensorCombobox.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.numberOfSensorCombobox.toolTipText")); // NOI18N
        numberOfSensorCombobox.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                numberOfSensorComboboxItemStateChanged(evt);
            }
        });
        numberOfSensorCombobox.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numberOfSensorComboboxPropertyChange(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(numberOfSensorLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.numberOfSensorLabel.text")); // NOI18N
        numberOfSensorLabel.setToolTipText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.numberOfSensorLabel.toolTipText")); // NOI18N

        dateFormatComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "DDMMYY", "YYYYMMDD" }));

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSenosorSpreadCentimeterLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSenosorSpreadCentimeterLabel.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel3.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel4.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(sensorTypeLabel, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.sensorTypeLabel.text")); // NOI18N

        sensorTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ACS-430", "ACS-470" }));
        sensorTypeComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sensorTypeComboBoxActionPerformed(evt);
            }
        });

        cropCircleSensorSpreadTextFieldL1.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldL1.text")); // NOI18N
        cropCircleSensorSpreadTextFieldL1.setPreferredSize(new java.awt.Dimension(59, 20));
        cropCircleSensorSpreadTextFieldL1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cropCircleSensorSpreadTextFieldL1ActionPerformed(evt);
            }
        });

        cropCircleSensorSpreadTextFieldR1.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldR1.text")); // NOI18N
        cropCircleSensorSpreadTextFieldR1.setPreferredSize(new java.awt.Dimension(59, 20));

        cropCircleSensorSpreadTextFieldL2.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldL2.text")); // NOI18N
        cropCircleSensorSpreadTextFieldL2.setPreferredSize(new java.awt.Dimension(60, 20));

        cropCircleSensorSpreadTextFieldR2.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldR2.text")); // NOI18N
        cropCircleSensorSpreadTextFieldR2.setPreferredSize(new java.awt.Dimension(60, 20));

        cropCircleSensorSpreadTextFieldR3.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldR3.text")); // NOI18N
        cropCircleSensorSpreadTextFieldR3.setPreferredSize(new java.awt.Dimension(59, 20));

        cropCircleSensorSpreadTextFieldL3.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadTextFieldL3.text")); // NOI18N
        cropCircleSensorSpreadTextFieldL3.setPreferredSize(new java.awt.Dimension(59, 20));
        cropCircleSensorSpreadTextFieldL3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cropCircleSensorSpreadTextFieldL3ActionPerformed(evt);
            }
        });

        jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);

        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel5.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel6.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelL1, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelL1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelL2, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelL2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelL3, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelL3.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelR1, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelR1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelR2, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelR2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(cropCircleSensorSpreadLabelR3, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.cropCircleSensorSpreadLabelR3.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel8.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(channelLabel1, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.channelLabel1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(channelLabel2, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.channelLabel2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(channelLabel3, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.Channel3Label.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.jLabel9.text")); // NOI18N

        channelTextField1.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.channelTextField1.text")); // NOI18N
        channelTextField1.setPreferredSize(new java.awt.Dimension(60, 20));

        channelTextField2.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.channelTextField2.text")); // NOI18N
        channelTextField2.setPreferredSize(new java.awt.Dimension(60, 20));

        channelTextField3.setText(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.channelTextField3.text")); // NOI18N
        channelTextField3.setPreferredSize(new java.awt.Dimension(60, 20));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cropcircleLabel)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(sensorTypeLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2378, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(350, 350, 350)
                        .addComponent(cropCircleSenosorSpreadCentimeterLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2035, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1756, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 2263, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(cropCircleSeparator, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 2448, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(numberOfSensorLabel)
                                    .addComponent(fileFormatLabel)
                                    .addComponent(cropcircleSensorHeightLabel))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1941, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(dateFormatComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(numberOfSensorCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cropCircleSensorHeightSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cropCircleSensorHieghtDisplayLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(10, 10, 10)
                                .addComponent(meterLabel)))
                        .addGap(110, 110, 110))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(channelLabel3)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(channelTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(channelLabel2)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(channelTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(channelLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(channelTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel5)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cropCircleSensorSpreadTextFieldL3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(cropCircleSensorSpreadLabelL3))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cropCircleSensorSpreadTextFieldL2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(cropCircleSensorSpreadLabelL2))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cropCircleSensorSpreadLabelL1)
                                        .addComponent(cropCircleSensorSpreadTextFieldL1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGap(26, 26, 26)
                            .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addGap(2, 2, 2)
                                            .addComponent(cropCircleSensorSpreadTextFieldR1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addComponent(cropCircleSensorSpreadLabelR1))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cropCircleSensorSpreadTextFieldR2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(cropCircleSensorSpreadLabelR2))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(cropCircleSensorSpreadLabelR3)
                                        .addComponent(cropCircleSensorSpreadTextFieldR3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addComponent(jLabel6)))
                        .addComponent(sensorTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cropcircleLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cropCircleSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(fileFormatLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cropcircleSensorHeightLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
                        .addGap(6, 6, 6)
                        .addComponent(numberOfSensorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(dateFormatComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(meterLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(cropCircleSensorHieghtDisplayLabel))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(cropCircleSensorHeightSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(numberOfSensorCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(14, 14, 14)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cropCircleSensorSpreadLabelL1)
                            .addComponent(cropCircleSensorSpreadLabelL2)
                            .addComponent(cropCircleSensorSpreadLabelL3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cropCircleSensorSpreadTextFieldL1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cropCircleSensorSpreadTextFieldL2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cropCircleSensorSpreadTextFieldL3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cropCircleSensorSpreadLabelR2)
                            .addComponent(cropCircleSensorSpreadLabelR3)
                            .addComponent(cropCircleSensorSpreadLabelR1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cropCircleSensorSpreadTextFieldR1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cropCircleSensorSpreadTextFieldR2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cropCircleSensorSpreadTextFieldR3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cropCircleSenosorSpreadCentimeterLabel)
                .addGap(3, 3, 3)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(sensorTypeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sensorTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(channelLabel1)
                    .addComponent(channelTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(channelLabel2)
                    .addComponent(channelTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(channelLabel3)
                    .addComponent(channelTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addGap(49, 49, 49)
                .addComponent(jLabel2)
                .addGap(459, 459, 459))
        );

        numberOfSensorLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "SensormetadataPanel.jLabel1.AccessibleContext.accessibleName")); // NOI18N
        channelLabel3.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CropcircleMetadataPanel.class, "CropcircleMetadataPanel.Chanel3Label.AccessibleContext.accessibleName")); // NOI18N
    }// </editor-fold>//GEN-END:initComponents

    private void cropCircleSensorHeightSliderPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_cropCircleSensorHeightSliderPropertyChange
        cropCircleSensorHieghtDisplayLabel.setText(((Integer) cropCircleSensorHeightSlider.getValue()).toString());
    }//GEN-LAST:event_cropCircleSensorHeightSliderPropertyChange

    private void cropCircleSensorHeightSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_cropCircleSensorHeightSliderStateChanged
        cropCircleSensorHieghtDisplayLabel.setText(((Integer) cropCircleSensorHeightSlider.getValue()).toString());
    }//GEN-LAST:event_cropCircleSensorHeightSliderStateChanged

    private void numberOfSensorComboboxPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_numberOfSensorComboboxPropertyChange
        displaySensorSpreadComponents();
    }//GEN-LAST:event_numberOfSensorComboboxPropertyChange

    private void numberOfSensorComboboxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_numberOfSensorComboboxItemStateChanged
        displaySensorSpreadComponents();
    }//GEN-LAST:event_numberOfSensorComboboxItemStateChanged

    private void sensorTypeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sensorTypeComboBoxActionPerformed

    }//GEN-LAST:event_sensorTypeComboBoxActionPerformed

    private void cropCircleSensorSpreadTextFieldL1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cropCircleSensorSpreadTextFieldL1ActionPerformed
        controller.changed();
    }//GEN-LAST:event_cropCircleSensorSpreadTextFieldL1ActionPerformed

    private void cropCircleSensorSpreadTextFieldL3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cropCircleSensorSpreadTextFieldL3ActionPerformed
        controller.changed();
    }//GEN-LAST:event_cropCircleSensorSpreadTextFieldL3ActionPerformed

    private void displaySensorSpreadComponents() {
        switch (Integer.parseInt(numberOfSensorCombobox.getSelectedItem().toString())) {
            case 2:
                cropCircleSensorSpreadTextFieldL2.setEnabled(false);
                cropCircleSensorSpreadTextFieldR2.setEnabled(false);
                cropCircleSensorSpreadTextFieldL3.setEnabled(false);
                cropCircleSensorSpreadTextFieldR3.setEnabled(false);

                cropCircleSensorSpreadLabelL2.setEnabled(false);
                cropCircleSensorSpreadLabelR2.setEnabled(false);
                cropCircleSensorSpreadLabelL3.setEnabled(false);
                cropCircleSensorSpreadLabelR3.setEnabled(false);
                break;
            case 4:
                cropCircleSensorSpreadTextFieldL2.setEnabled(true);
                cropCircleSensorSpreadTextFieldR2.setEnabled(true);
                cropCircleSensorSpreadTextFieldL3.setEnabled(false);
                cropCircleSensorSpreadTextFieldR3.setEnabled(false);

                cropCircleSensorSpreadLabelL2.setEnabled(true);
                cropCircleSensorSpreadLabelR2.setEnabled(true);
                cropCircleSensorSpreadLabelL3.setEnabled(false);
                cropCircleSensorSpreadLabelR3.setEnabled(false);
                break;
            case 6:
                cropCircleSensorSpreadTextFieldL2.setEnabled(true);
                cropCircleSensorSpreadTextFieldR2.setEnabled(true);
                cropCircleSensorSpreadTextFieldL3.setEnabled(true);
                cropCircleSensorSpreadTextFieldR3.setEnabled(true);

                cropCircleSensorSpreadLabelL2.setEnabled(true);
                cropCircleSensorSpreadLabelR2.setEnabled(true);
                cropCircleSensorSpreadLabelL3.setEnabled(true);
                cropCircleSensorSpreadLabelR3.setEnabled(true);
                break;
            default:
                cropCircleSensorSpreadTextFieldL1.setEnabled(true);
                cropCircleSensorSpreadTextFieldR1.setEnabled(true);
                cropCircleSensorSpreadTextFieldL2.setEnabled(false);
                cropCircleSensorSpreadTextFieldR2.setEnabled(false);
                cropCircleSensorSpreadTextFieldL3.setEnabled(false);
                cropCircleSensorSpreadTextFieldR3.setEnabled(false);

                cropCircleSensorSpreadLabelL2.setEnabled(false);
                cropCircleSensorSpreadLabelR2.setEnabled(false);
                cropCircleSensorSpreadLabelL3.setEnabled(false);
                cropCircleSensorSpreadLabelR3.setEnabled(false);
                break;
        }
    }

    void load() {
        dateFormatComboBox.setSelectedItem(CropcirclePreference.SENSOR_DATA_FILE_FORMAT.getValue());
        cropCircleSensorHeightSlider.setValue(Integer.parseInt(CropcirclePreference.CROPCIRCLE_SENSOR_HEIGTH.getValue()));
        numberOfSensorCombobox.setSelectedItem(Integer.parseInt(CropcirclePreference.NUMBER_OF_CROPCIRCLE_SENSORS.getValue()));
        setCropCircleSensorSpread(CropcirclePreference.CROPCIRCLE_SENSOR_SPREAD.getValue());
        sensorTypeComboBox.setSelectedItem(CropcirclePreference.SENSOR_TYPE.getValue());
        setSpectralRange(CropcirclePreference.SPECTRAL_CHANNELS.getValue());
    }

    void store() {
        CropcirclePreference.SENSOR_DATA_FILE_FORMAT.saveValue( dateFormatComboBox.getSelectedItem().toString());
        CropcirclePreference.CROPCIRCLE_SENSOR_HEIGTH.saveValue(((Integer)cropCircleSensorHeightSlider.getValue()).toString());
        CropcirclePreference.NUMBER_OF_CROPCIRCLE_SENSORS.saveValue((numberOfSensorCombobox.getSelectedItem()).toString());
        CropcirclePreference.CROPCIRCLE_SENSOR_SPREAD.saveValue(getCropCircleSensorSpread());
        CropcirclePreference.SENSOR_TYPE.saveValue(sensorTypeComboBox.getSelectedItem().toString());
        CropcirclePreference.SPECTRAL_CHANNELS.saveValue(getSpectralRange());
    }

    public void setSpectralRange(String spectralRange){
        String[] spreadNumber = spectralRange.split(",");
        if(spreadNumber.length ==3){
            channelTextField1.setText(spreadNumber[0]);
            channelTextField2.setText(spreadNumber[1]);
            channelTextField3.setText(spreadNumber[2]);
        } else if(spreadNumber.length !=0){
            StringBuilder logBuilder = new StringBuilder("Error while trying to retreive spectral channel string: ");
            logBuilder.append(spectralRange);
            LOG.error(logBuilder.toString());
        }
    }

    public String getSpectralRange(){
        ArrayList <javax.swing.JTextField> fields = new ArrayList<javax.swing.JTextField>();
        fields.add(channelTextField1);
        fields.add(channelTextField2);
        fields.add(channelTextField3);
        StringBuilder spectralChannels = new StringBuilder();
        for (javax.swing.JTextField textField : fields){
            if(textField.isEnabled()){
                spectralChannels.append(textField.getText());
                spectralChannels.append(",");
            }

        }
        //Delete last ','
        spectralChannels.deleteCharAt(spectralChannels.length()-1);
        return spectralChannels.toString();
    }

    public void setCropCircleSensorSpread(String cropCircleSpread){
        int savedNumber = Integer.parseInt(CropcirclePreference.NUMBER_OF_CROPCIRCLE_SENSORS.getValue());
        String[] spreadNumber = cropCircleSpread.split(",");
        int numberInString = spreadNumber.length;
        if(savedNumber != numberInString && numberInString != 0){
            //Something went wrong restore defaults and log
            StringBuilder logBuilder = new StringBuilder("Could not load sensor spread expected: ");
            logBuilder.append(savedNumber);
            logBuilder.append("but receaved saved string: ");
            logBuilder.append(cropCircleSpread);
            LOG.error(logBuilder.toString());
        } else{
            if(numberInString == 2){
                cropCircleSensorSpreadTextFieldL1.setText(spreadNumber[0]);
                cropCircleSensorSpreadTextFieldR1.setText(spreadNumber[1]);
            } else if(numberInString ==4){
                cropCircleSensorSpreadTextFieldL2.setText(spreadNumber[0]);
                cropCircleSensorSpreadTextFieldL1.setText(spreadNumber[1]);
                cropCircleSensorSpreadTextFieldR1.setText(spreadNumber[2]);
                cropCircleSensorSpreadTextFieldR2.setText(spreadNumber[3]);
            } else if(numberInString ==6){
                cropCircleSensorSpreadTextFieldL3.setText(spreadNumber[0]);
                cropCircleSensorSpreadTextFieldL2.setText(spreadNumber[1]);
                cropCircleSensorSpreadTextFieldL1.setText(spreadNumber[2]);
                cropCircleSensorSpreadTextFieldR1.setText(spreadNumber[3]);
                cropCircleSensorSpreadTextFieldR2.setText(spreadNumber[4]);
                cropCircleSensorSpreadTextFieldR3.setText(spreadNumber[5]);
            }
        }
    }

    public String getCropCircleSensorSpread(){
        ArrayList <javax.swing.JTextField> fields = new ArrayList<javax.swing.JTextField>();
        fields.add(cropCircleSensorSpreadTextFieldL3);
        fields.add(cropCircleSensorSpreadTextFieldL2);
        fields.add(cropCircleSensorSpreadTextFieldL1);
        fields.add(cropCircleSensorSpreadTextFieldR1);
        fields.add(cropCircleSensorSpreadTextFieldR2);
        fields.add(cropCircleSensorSpreadTextFieldR3);
        StringBuilder cropCircleSpread = new StringBuilder();
        for (javax.swing.JTextField textField : fields){
            if(textField.isEnabled()){
                cropCircleSpread.append(textField.getText());
                cropCircleSpread.append(",");
            }

        }
        //Delete last ','
        cropCircleSpread.deleteCharAt(cropCircleSpread.length()-1);
        return cropCircleSpread.toString();
    }

    boolean valid() {
        ArrayList <javax.swing.JTextField> fields = new ArrayList<javax.swing.JTextField>();
        fields.add(cropCircleSensorSpreadTextFieldL3);
        fields.add(cropCircleSensorSpreadTextFieldL2);
        fields.add(cropCircleSensorSpreadTextFieldL1);
        fields.add(cropCircleSensorSpreadTextFieldR1);
        fields.add(cropCircleSensorSpreadTextFieldR2);
        fields.add(cropCircleSensorSpreadTextFieldR3);
        fields.add(channelTextField1);
        fields.add(channelTextField2);
        fields.add(channelTextField3);
        for (javax.swing.JTextField textField : fields){
            if(textField.isEnabled()){
                if(!textField.getText().matches("[0-9]*")){
                    return false;
                }
            }
        }
        return true;
    }



    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel channelLabel1;
    private javax.swing.JLabel channelLabel2;
    private javax.swing.JLabel channelLabel3;
    private javax.swing.JTextField channelTextField1;
    private javax.swing.JTextField channelTextField2;
    private javax.swing.JTextField channelTextField3;
    private javax.swing.JLabel cropCircleSenosorSpreadCentimeterLabel;
    private javax.swing.JSlider cropCircleSensorHeightSlider;
    private javax.swing.JLabel cropCircleSensorHieghtDisplayLabel;
    private javax.swing.JLabel cropCircleSensorSpreadLabelL1;
    private javax.swing.JLabel cropCircleSensorSpreadLabelL2;
    private javax.swing.JLabel cropCircleSensorSpreadLabelL3;
    private javax.swing.JLabel cropCircleSensorSpreadLabelR1;
    private javax.swing.JLabel cropCircleSensorSpreadLabelR2;
    private javax.swing.JLabel cropCircleSensorSpreadLabelR3;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldL1;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldL2;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldL3;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldR1;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldR2;
    private javax.swing.JTextField cropCircleSensorSpreadTextFieldR3;
    private javax.swing.JSeparator cropCircleSeparator;
    private javax.swing.JLabel cropcircleLabel;
    private javax.swing.JLabel cropcircleSensorHeightLabel;
    private javax.swing.JComboBox dateFormatComboBox;
    private javax.swing.JLabel fileFormatLabel;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JLabel meterLabel;
    private javax.swing.JComboBox numberOfSensorCombobox;
    private javax.swing.JLabel numberOfSensorLabel;
    private javax.swing.JComboBox sensorTypeComboBox;
    private javax.swing.JLabel sensorTypeLabel;
    // End of variables declaration//GEN-END:variables

    @Override
    public void keyTyped(KeyEvent e) {

    }

    @Override
    public void keyPressed(KeyEvent e) {

    }

    @Override
    public void keyReleased(KeyEvent e) {
        controller.changed();
    }


    
}
